import Vue from 'vue'
import Router from 'vue-router'
//主页和子路由
import homePageMain from '@/components/homePage/main.vue'
import homePage from '@/components/homePage/component/homePage.vue'
import minePage from '@/components/homePage/component/minePage.vue'
import test1 from '@/components/demo/test1.vue'
 //购物和子路由
import shopping from '@/components/shopping/shopping.vue'
import buy from '@/components/shopping/component/buy.vue'
import saler from '@/components/shopping/component/saler.vue'
//结算路由
import settlement from '@/components/shopping/settlement.vue'
Vue.use(Router)
export default new Router({
  routes: [
    //主页和子路由
    {
      path:'/main',
      name:'Main',
      component:homePageMain,
      children:[{
         path:'/main/homePage',
        name:"homePage",
        component:homePage
      },{
         path:'/main/minePage',
        name:"minePage",
        component:minePage
      }]
    },
    //购物和子路由
    {
      path:'/shopping',
      name:'shopping',
      component:shopping,
      children:[{
        path:'/shopping/buy',
        name:"buy",
        component:buy
      },{
        path:"/shopping/saler",
        name:"saler",
        component:saler
      }]
    },
    //结算路由
    {
      path:'/settlement',
      name:'settlement',
      component:settlement
    },{
    	path: '/test1',
    	name: 'test1',
    	component:test1
    }
  ]
})
